<template>
  <div class="box">
    <el-breadcrumb separator="/">
      <el-breadcrumb-item :to="{ path: '/page' }">首页</el-breadcrumb-item>
      <el-breadcrumb-item>数据统计</el-breadcrumb-item>
      <el-breadcrumb-item>数据报表</el-breadcrumb-item>
    </el-breadcrumb>
    <el-divider></el-divider>
    <el-card class="box-card">
      <div id="main" style="height: 400px; width: 800px"></div>
    </el-card>
  </div>
</template>

<script>
import { getReports } from '@/api/login.js'
export default {
  data() {
    return {}
  },
  mounted() {
    getReports().then((res) => {
      // console.log(res)
      var echarts = require('echarts')
      var myChart = echarts.init(document.getElementById('main'))
      myChart.setOption(res.data.data)
    })
  },
}
</script>

<style scoped lang="scss">
* {
  box-sizing: border-box;
}
.box-card {
  margin: 20px;
}
</style>
